<template>
  <div class="consultation-results">
    <el-card shadow="never">
      <template #header>
        <h2>会诊结果列表</h2>
      </template>
      
      <el-table :data="resultsData" stripe>
        <el-table-column prop="patientName" label="患者姓名" />
        <el-table-column prop="consultationDate" label="会诊时间" />
        <el-table-column prop="participants" label="参与人员" />
        <el-table-column prop="diagnosis" label="诊断结果" />
        <el-table-column prop="treatment" label="治疗方案" />
        <el-table-column label="操作">
          <template #default="{ row }">
            <el-button type="primary" size="small" @click="handleView(row)">查看详情</el-button>
            <el-button type="success" size="small" @click="handleDownload(row)">下载报告</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { ElMessage } from 'element-plus'

const resultsData = ref([
  {
    patientName: '张三',
    consultationDate: '2024-01-15',
    participants: '李医生、王医生',
    diagnosis: '肺癌晚期',
    treatment: '化疗+靶向治疗'
  }
])

const handleView = (row: any) => {
  ElMessage.success(`查看详情: ${row.patientName}`)
}

const handleDownload = (row: any) => {
  ElMessage.success(`下载报告: ${row.patientName}`)
}
</script>

<style lang="scss" scoped>
.consultation-results {
  h2 {
    margin: 0;
    color: #303133;
  }
}
</style>